import cn.yunhe.dao.ITypeDaoMapper;
import cn.yunhe.entity.merchantsentity.Type;
import cn.yunhe.util.SqlSessionFactoryUtil;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

public class Demo21 {
    SqlSession session = SqlSessionFactoryUtil.getSqlSession();
    ITypeDaoMapper typeDaoMapper = session.getMapper(ITypeDaoMapper.class);

    @Test
    public void test2(){
        Type type = new Type();
        type.setType("粤菜");
        typeDaoMapper.addType(type);
        session.commit();
    }

    @Test
    public void test3(){

       int result= typeDaoMapper.searchType("川菜");
        System.out.println(result);
    }
}
